.class public Lcom/brixd/niceapp/community/CommunityMainFragment;
.super Lcom/brixd/niceapp/activity/fragment/AbsBaseFragment;
.source "CommunityMainFragment.java"


# static fields
.field private static final REQUEST_CODE_AUTH:I = 0xa

.field public static final REQUEST_CODE_PUBLISH:I = 0x3f2

.field public static final RESULT_CODE_PUBLISH_CANCEL:I = 0x3e8

.field public static final RESULT_CODE_PUBLISH_DONE:I = 0x3e9


# instance fields
.field private mAdapter:Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;

.field private mBackBtn:Landroid/widget/Button;

.field private mIndicatorMenu:Lcom/viewpagerindicator/TabMovablePageIndicator;

.field private mIsActive:Z

.field private mIsPublishAction:Z

.field private mMainBox:Landroid/view/View;

.field private mPublishBtn:Landroid/view/View;

.field private mSearchBtn:Landroid/view/View;

.field private mType:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

.field private mTypes:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;",
            ">;"
        }
    .end annotation
.end field

.field private mViewPager:Landroid/support/v4/view/ViewPager;


# direct methods
.method public constructor <init>()V
    .registers 3

    .prologue
    const/4 v1, 0x0

    .line 40
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/fragment/AbsBaseFragment;-><init>()V

    .line 56
    sget-object v0, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->Type_Hot:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    iput-object v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mType:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    .line 59
    iput-boolean v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mIsActive:Z

    .line 60
    iput-boolean v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mIsPublishAction:Z

    return-void
.end method

.method static synthetic access$000(Lcom/brixd/niceapp/community/CommunityMainFragment;)Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/CommunityMainFragment;

    .prologue
    .line 40
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mType:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    return-object v0
.end method

.method static synthetic access$002(Lcom/brixd/niceapp/community/CommunityMainFragment;Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;)Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/CommunityMainFragment;
    .param p1, "x1"    # Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    .prologue
    .line 40
    iput-object p1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mType:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    return-object p1
.end method

.method static synthetic access$100(Lcom/brixd/niceapp/community/CommunityMainFragment;)Ljava/util/ArrayList;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/CommunityMainFragment;

    .prologue
    .line 40
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mTypes:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$200(Lcom/brixd/niceapp/community/CommunityMainFragment;)Landroid/support/v4/view/ViewPager;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/CommunityMainFragment;

    .prologue
    .line 40
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mViewPager:Landroid/support/v4/view/ViewPager;

    return-object v0
.end method

.method static synthetic access$300(Lcom/brixd/niceapp/community/CommunityMainFragment;)Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/CommunityMainFragment;

    .prologue
    .line 40
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mAdapter:Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;

    return-object v0
.end method

.method static synthetic access$400(Lcom/brixd/niceapp/community/CommunityMainFragment;)V
    .registers 1
    .param p0, "x0"    # Lcom/brixd/niceapp/community/CommunityMainFragment;

    .prologue
    .line 40
    invoke-direct {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->performPublishClick()V

    return-void
.end method

.method public static getInstance()Lcom/brixd/niceapp/community/CommunityMainFragment;
    .registers 1

    .prologue
    .line 63
    const/4 v0, 0x0

    invoke-static {v0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getInstance(Landroid/os/Bundle;)Lcom/brixd/niceapp/community/CommunityMainFragment;

    move-result-object v0

    return-object v0
.end method

.method public static getInstance(Landroid/os/Bundle;)Lcom/brixd/niceapp/community/CommunityMainFragment;
    .registers 2
    .param p0, "extras"    # Landroid/os/Bundle;

    .prologue
    .line 67
    new-instance v0, Lcom/brixd/niceapp/community/CommunityMainFragment;

    invoke-direct {v0}, Lcom/brixd/niceapp/community/CommunityMainFragment;-><init>()V

    .line 68
    .local v0, "fragment":Lcom/brixd/niceapp/community/CommunityMainFragment;
    if-eqz p0, :cond_a

    .line 69
    invoke-virtual {v0, p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->setArguments(Landroid/os/Bundle;)V

    .line 71
    :cond_a
    return-object v0
.end method

.method private handlePublishEvent(Lcom/brixd/niceapp/model/UserModel;)V
    .registers 5
    .param p1, "userModel"    # Lcom/brixd/niceapp/model/UserModel;

    .prologue
    .line 264
    invoke-virtual {p1}, Lcom/brixd/niceapp/model/UserModel;->isInvited()Z

    move-result v1

    if-eqz v1, :cond_17

    .line 265
    new-instance v0, Landroid/content/Intent;

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v1

    const-class v2, Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 266
    .local v0, "intent":Landroid/content/Intent;
    const/16 v1, 0x3f2

    invoke-virtual {p0, v0, v1}, Lcom/brixd/niceapp/community/CommunityMainFragment;->startActivityForResult(Landroid/content/Intent;I)V

    .line 271
    :goto_16
    return-void

    .line 268
    .end local v0    # "intent":Landroid/content/Intent;
    :cond_17
    new-instance v0, Landroid/content/Intent;

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v1

    const-class v2, Lcom/brixd/niceapp/community/activity/AuthActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 269
    .restart local v0    # "intent":Landroid/content/Intent;
    const/16 v1, 0xa

    invoke-virtual {p0, v0, v1}, Lcom/brixd/niceapp/community/CommunityMainFragment;->startActivityForResult(Landroid/content/Intent;I)V

    goto :goto_16
.end method

.method private needRefresh()Z
    .registers 8

    .prologue
    const/16 v6, 0xc

    .line 274
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v4

    invoke-static {v4}, Lcom/zuiapps/suite/utils/network/NetworkUtils;->isOnline(Landroid/content/Context;)Z

    move-result v4

    if-nez v4, :cond_e

    .line 275
    const/4 v4, 0x0

    .line 291
    :goto_d
    return v4

    .line 279
    :cond_e
    iget-object v4, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mType:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    sget-object v5, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->Type_Hot:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    if-ne v4, v5, :cond_31

    .line 280
    invoke-static {}, Lcom/brixd/niceapp/service/AppService;->getCommunityHotAppsLastUpdatedTime()J

    move-result-wide v2

    .line 285
    .local v2, "timeInMillis":J
    :goto_18
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v0

    .line 286
    .local v0, "calendar":Ljava/util/Calendar;
    invoke-virtual {v0, v2, v3}, Ljava/util/Calendar;->setTimeInMillis(J)V

    .line 288
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v1

    .line 289
    .local v1, "curCalendar":Ljava/util/Calendar;
    invoke-virtual {v1, v6}, Ljava/util/Calendar;->get(I)I

    move-result v4

    add-int/lit8 v4, v4, -0x5

    invoke-virtual {v1, v6, v4}, Ljava/util/Calendar;->set(II)V

    .line 291
    invoke-virtual {v1, v0}, Ljava/util/Calendar;->after(Ljava/lang/Object;)Z

    move-result v4

    goto :goto_d

    .line 282
    .end local v0    # "calendar":Ljava/util/Calendar;
    .end local v1    # "curCalendar":Ljava/util/Calendar;
    .end local v2    # "timeInMillis":J
    :cond_31
    invoke-static {}, Lcom/brixd/niceapp/service/AppService;->getCommunityNewAppsLastUpdatedTime()J

    move-result-wide v2

    .restart local v2    # "timeInMillis":J
    goto :goto_18
.end method

.method private performPublishClick()V
    .registers 4

    .prologue
    .line 259
    new-instance v0, Landroid/content/Intent;

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v1

    const-class v2, Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 260
    .local v0, "intent":Landroid/content/Intent;
    const/16 v1, 0x3f2

    invoke-virtual {p0, v0, v1}, Lcom/brixd/niceapp/community/CommunityMainFragment;->startActivityForResult(Landroid/content/Intent;I)V

    .line 261
    return-void
.end method

.method private updateBg()V
    .registers 6

    .prologue
    .line 84
    invoke-static {}, Lcom/brixd/niceapp/service/UserService;->getLoginUser()Lcom/brixd/niceapp/model/UserModel;

    move-result-object v2

    .line 85
    .local v2, "userModel":Lcom/brixd/niceapp/model/UserModel;
    if-eqz v2, :cond_1e

    .line 86
    invoke-static {}, Lcom/brixd/niceapp/service/UserService;->getCurrentUserBg()I

    move-result v0

    .line 87
    .local v0, "bgColor":I
    if-eqz v0, :cond_1d

    .line 88
    iget-object v3, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mMainBox:Landroid/view/View;

    invoke-virtual {v3, v0}, Landroid/view/View;->setBackgroundColor(I)V

    .line 89
    invoke-static {}, Lcom/brixd/niceapp/bus/BusProvider;->getInstance()Lcom/squareup/otto/Bus;

    move-result-object v3

    new-instance v4, Lcom/brixd/niceapp/bus/event/UpdateBgColorEvent;

    invoke-direct {v4, v0}, Lcom/brixd/niceapp/bus/event/UpdateBgColorEvent;-><init>(I)V

    invoke-virtual {v3, v4}, Lcom/squareup/otto/Bus;->post(Ljava/lang/Object;)V

    .line 96
    .end local v0    # "bgColor":I
    :cond_1d
    :goto_1d
    return-void

    .line 92
    :cond_1e
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f08002a

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getColor(I)I

    move-result v1

    .line 93
    .local v1, "color":I
    iget-object v3, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mMainBox:Landroid/view/View;

    invoke-virtual {v3, v1}, Landroid/view/View;->setBackgroundColor(I)V

    .line 94
    invoke-static {}, Lcom/brixd/niceapp/bus/BusProvider;->getInstance()Lcom/squareup/otto/Bus;

    move-result-object v3

    new-instance v4, Lcom/brixd/niceapp/bus/event/UpdateBgColorEvent;

    invoke-direct {v4, v1}, Lcom/brixd/niceapp/bus/event/UpdateBgColorEvent;-><init>(I)V

    invoke-virtual {v3, v4}, Lcom/squareup/otto/Bus;->post(Ljava/lang/Object;)V

    goto :goto_1d
.end method


# virtual methods
.method public delAppMode(Lcom/brixd/niceapp/bus/event/DelCommunityAppModelEvent;)V
    .registers 5
    .param p1, "event"    # Lcom/brixd/niceapp/bus/event/DelCommunityAppModelEvent;
    .annotation runtime Lcom/squareup/otto/Subscribe;
    .end annotation

    .prologue
    .line 306
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mTypes:Ljava/util/ArrayList;

    iget-object v2, p1, Lcom/brixd/niceapp/bus/event/DelCommunityAppModelEvent;->type:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->indexOf(Ljava/lang/Object;)I

    move-result v0

    .line 307
    .local v0, "position":I
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mAdapter:Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;

    iget-object v2, p1, Lcom/brixd/niceapp/bus/event/DelCommunityAppModelEvent;->appModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v1, v0, v2}, Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;->delApp(ILcom/brixd/niceapp/community/model/CommunityAppModel;)V

    .line 308
    return-void
.end method

.method public editAppModel(Lcom/brixd/niceapp/bus/event/EditCommunityAppModelEvent;)V
    .registers 5
    .param p1, "event"    # Lcom/brixd/niceapp/bus/event/EditCommunityAppModelEvent;
    .annotation runtime Lcom/squareup/otto/Subscribe;
    .end annotation

    .prologue
    .line 312
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mTypes:Ljava/util/ArrayList;

    iget-object v2, p1, Lcom/brixd/niceapp/bus/event/EditCommunityAppModelEvent;->type:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->indexOf(Ljava/lang/Object;)I

    move-result v0

    .line 313
    .local v0, "position":I
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mAdapter:Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;

    iget-object v2, p1, Lcom/brixd/niceapp/bus/event/EditCommunityAppModelEvent;->appModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v1, v0, v2}, Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;->editApp(ILcom/brixd/niceapp/community/model/CommunityAppModel;)V

    .line 314
    return-void
.end method

.method protected initActions(Landroid/view/View;)V
    .registers 4
    .param p1, "fragmentView"    # Landroid/view/View;

    .prologue
    .line 184
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mBackBtn:Landroid/widget/Button;

    new-instance v1, Lcom/brixd/niceapp/community/CommunityMainFragment$2;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/CommunityMainFragment$2;-><init>(Lcom/brixd/niceapp/community/CommunityMainFragment;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 192
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mSearchBtn:Landroid/view/View;

    new-instance v1, Lcom/brixd/niceapp/community/CommunityMainFragment$3;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/CommunityMainFragment$3;-><init>(Lcom/brixd/niceapp/community/CommunityMainFragment;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 204
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mPublishBtn:Landroid/view/View;

    new-instance v1, Lcom/brixd/niceapp/community/CommunityMainFragment$4;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/CommunityMainFragment$4;-><init>(Lcom/brixd/niceapp/community/CommunityMainFragment;)V

    invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 214
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mIndicatorMenu:Lcom/viewpagerindicator/TabMovablePageIndicator;

    new-instance v1, Lcom/brixd/niceapp/community/CommunityMainFragment$5;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/CommunityMainFragment$5;-><init>(Lcom/brixd/niceapp/community/CommunityMainFragment;)V

    invoke-virtual {v0, v1}, Lcom/viewpagerindicator/TabMovablePageIndicator;->setOnPageChangeListener(Landroid/support/v4/view/ViewPager$OnPageChangeListener;)V

    .line 240
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mIndicatorMenu:Lcom/viewpagerindicator/TabMovablePageIndicator;

    new-instance v1, Lcom/brixd/niceapp/community/CommunityMainFragment$6;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/CommunityMainFragment$6;-><init>(Lcom/brixd/niceapp/community/CommunityMainFragment;)V

    invoke-virtual {v0, v1}, Lcom/viewpagerindicator/TabMovablePageIndicator;->setOnTabReselectedListener(Lcom/viewpagerindicator/TabMovablePageIndicator$OnTabReselectedListener;)V

    .line 249
    return-void
.end method

.method protected initData()V
    .registers 5

    .prologue
    .line 143
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    iput-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mTypes:Ljava/util/ArrayList;

    .line 144
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mTypes:Ljava/util/ArrayList;

    sget-object v2, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->Type_Hot:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 145
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mTypes:Ljava/util/ArrayList;

    sget-object v2, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->Type_New:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 146
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mTypes:Ljava/util/ArrayList;

    sget-object v2, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->Type_App_Ranking:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 147
    new-instance v1, Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getFragmentManager()Landroid/support/v4/app/FragmentManager;

    move-result-object v2

    iget-object v3, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mTypes:Ljava/util/ArrayList;

    invoke-direct {v1, v2, v3}, Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;-><init>(Landroid/support/v4/app/FragmentManager;Ljava/util/List;)V

    iput-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mAdapter:Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;

    .line 149
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v1

    instance-of v1, v1, Lcom/brixd/niceapp/activity/AbsBaseSlidingMenuActivity;

    if-eqz v1, :cond_3f

    .line 151
    :try_start_31
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v1

    check-cast v1, Lcom/brixd/niceapp/activity/AbsBaseSlidingMenuActivity;

    invoke-virtual {v1}, Lcom/brixd/niceapp/activity/AbsBaseSlidingMenuActivity;->getSlidingMenu()Lcom/jeremyfeinstein/slidingmenu/lib/SlidingMenu;

    move-result-object v1

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Lcom/jeremyfeinstein/slidingmenu/lib/SlidingMenu;->setTouchModeAbove(I)V
    :try_end_3f
    .catch Ljava/lang/Exception; {:try_start_31 .. :try_end_3f} :catch_40

    .line 156
    :cond_3f
    :goto_3f
    return-void

    .line 152
    :catch_40
    move-exception v0

    .line 153
    .local v0, "e":Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_3f
.end method

.method protected initViews(Landroid/view/LayoutInflater;)Landroid/view/View;
    .registers 7
    .param p1, "inflater"    # Landroid/view/LayoutInflater;

    .prologue
    .line 160
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v1

    const v2, 0x7f030051

    const/4 v3, 0x0

    invoke-static {v1, v2, v3}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    .line 162
    .local v0, "view":Landroid/view/View;
    const v1, 0x7f0a011a

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    iput-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mMainBox:Landroid/view/View;

    .line 164
    const v1, 0x7f0a00a5

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/support/v4/view/ViewPager;

    iput-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mViewPager:Landroid/support/v4/view/ViewPager;

    .line 165
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mViewPager:Landroid/support/v4/view/ViewPager;

    const/4 v2, 0x2

    invoke-virtual {v1, v2}, Landroid/support/v4/view/ViewPager;->setOffscreenPageLimit(I)V

    .line 166
    const v1, 0x7f0a011e

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    iput-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mPublishBtn:Landroid/view/View;

    .line 167
    const v1, 0x7f0a011d

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    iput-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mSearchBtn:Landroid/view/View;

    .line 168
    const v1, 0x7f0a011c

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    iput-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mBackBtn:Landroid/widget/Button;

    .line 170
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mViewPager:Landroid/support/v4/view/ViewPager;

    iget-object v2, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mAdapter:Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;

    invoke-virtual {v1, v2}, Landroid/support/v4/view/ViewPager;->setAdapter(Landroid/support/v4/view/PagerAdapter;)V

    .line 172
    const v1, 0x7f0a00a3

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Lcom/viewpagerindicator/TabMovablePageIndicator;

    iput-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mIndicatorMenu:Lcom/viewpagerindicator/TabMovablePageIndicator;

    .line 173
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mIndicatorMenu:Lcom/viewpagerindicator/TabMovablePageIndicator;

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f08007f

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getColor(I)I

    move-result v2

    invoke-virtual {v1, v2}, Lcom/viewpagerindicator/TabMovablePageIndicator;->setIndicatorColor(I)V

    .line 174
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mIndicatorMenu:Lcom/viewpagerindicator/TabMovablePageIndicator;

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f09006a

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v2

    .line 175
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f090038

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v3

    .line 174
    invoke-virtual {v1, v2, v3}, Lcom/viewpagerindicator/TabMovablePageIndicator;->setIndicatorLayoutParams(II)V

    .line 176
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mIndicatorMenu:Lcom/viewpagerindicator/TabMovablePageIndicator;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Lcom/viewpagerindicator/TabMovablePageIndicator;->setTabAllDisplay(Z)V

    .line 177
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mIndicatorMenu:Lcom/viewpagerindicator/TabMovablePageIndicator;

    iget-object v2, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mViewPager:Landroid/support/v4/view/ViewPager;

    invoke-virtual {v1, v2}, Lcom/viewpagerindicator/TabMovablePageIndicator;->setViewPager(Landroid/support/v4/view/ViewPager;)V

    .line 179
    return-object v0
.end method

.method public onActivityCreated(Landroid/os/Bundle;)V
    .registers 6
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    .line 113
    invoke-super {p0, p1}, Lcom/brixd/niceapp/activity/fragment/AbsBaseFragment;->onActivityCreated(Landroid/os/Bundle;)V

    .line 116
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getArguments()Landroid/os/Bundle;

    move-result-object v0

    if-eqz v0, :cond_18

    .line 118
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getArguments()Landroid/os/Bundle;

    move-result-object v0

    const-string v1, "AutoPublish"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_19

    .line 119
    invoke-direct {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->performPublishClick()V

    .line 133
    :cond_18
    :goto_18
    return-void

    .line 120
    :cond_19
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getArguments()Landroid/os/Bundle;

    move-result-object v0

    const-string v1, "ShowNew"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_18

    .line 121
    iget-object v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mViewPager:Landroid/support/v4/view/ViewPager;

    new-instance v1, Lcom/brixd/niceapp/community/CommunityMainFragment$1;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/CommunityMainFragment$1;-><init>(Lcom/brixd/niceapp/community/CommunityMainFragment;)V

    const-wide/16 v2, 0x12c

    invoke-virtual {v0, v1, v2, v3}, Landroid/support/v4/view/ViewPager;->postDelayed(Ljava/lang/Runnable;J)Z

    goto :goto_18
.end method

.method public onActivityResult(IILandroid/content/Intent;)V
    .registers 9
    .param p1, "requestCode"    # I
    .param p2, "resultCode"    # I
    .param p3, "data"    # Landroid/content/Intent;

    .prologue
    const/16 v4, 0x3f2

    const/16 v3, 0xa

    .line 324
    invoke-super {p0, p1, p2, p3}, Lcom/brixd/niceapp/activity/fragment/AbsBaseFragment;->onActivityResult(IILandroid/content/Intent;)V

    .line 325
    if-ne p1, v4, :cond_24

    const/16 v2, 0x3e9

    if-ne p2, v2, :cond_24

    .line 326
    sget-object v2, Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;->Type_New:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    iput-object v2, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mType:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    .line 327
    iget-object v2, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mTypes:Ljava/util/ArrayList;

    iget-object v3, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mType:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->indexOf(Ljava/lang/Object;)I

    move-result v1

    .line 328
    .local v1, "position":I
    iget-object v2, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mViewPager:Landroid/support/v4/view/ViewPager;

    invoke-virtual {v2, v1}, Landroid/support/v4/view/ViewPager;->setCurrentItem(I)V

    .line 329
    iget-object v2, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mAdapter:Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;

    invoke-virtual {v2, v1}, Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;->refreshAppList(I)V

    .line 334
    .end local v1    # "position":I
    :cond_23
    :goto_23
    return-void

    .line 330
    :cond_24
    if-ne p1, v3, :cond_23

    if-ne p2, v3, :cond_23

    .line 331
    new-instance v0, Landroid/content/Intent;

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v2

    const-class v3, Lcom/brixd/niceapp/community/activity/PublishAppActivity;

    invoke-direct {v0, v2, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 332
    .local v0, "intent":Landroid/content/Intent;
    invoke-virtual {p0, v0, v4}, Lcom/brixd/niceapp/community/CommunityMainFragment;->startActivityForResult(Landroid/content/Intent;I)V

    goto :goto_23
.end method

.method public onColorChanged(Lcom/brixd/niceapp/bus/event/UpdateCommunityBgEvent;)V
    .registers 2
    .param p1, "event"    # Lcom/brixd/niceapp/bus/event/UpdateCommunityBgEvent;
    .annotation runtime Lcom/squareup/otto/Subscribe;
    .end annotation

    .prologue
    .line 338
    invoke-direct {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->updateBg()V

    .line 339
    return-void
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .registers 3
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    .line 107
    invoke-super {p0, p1}, Lcom/brixd/niceapp/activity/fragment/AbsBaseFragment;->onCreate(Landroid/os/Bundle;)V

    .line 108
    invoke-static {}, Lcom/brixd/niceapp/bus/BusProvider;->getInstance()Lcom/squareup/otto/Bus;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/squareup/otto/Bus;->register(Ljava/lang/Object;)V

    .line 109
    return-void
.end method

.method public onDestroy()V
    .registers 2

    .prologue
    .line 137
    invoke-super {p0}, Lcom/brixd/niceapp/activity/fragment/AbsBaseFragment;->onDestroy()V

    .line 138
    invoke-static {}, Lcom/brixd/niceapp/bus/BusProvider;->getInstance()Lcom/squareup/otto/Bus;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/squareup/otto/Bus;->unregister(Ljava/lang/Object;)V

    .line 139
    return-void
.end method

.method public onPause()V
    .registers 2

    .prologue
    .line 100
    invoke-super {p0}, Lcom/brixd/niceapp/activity/fragment/AbsBaseFragment;->onPause()V

    .line 101
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mIsActive:Z

    .line 102
    const-string v0, "CommunityMainFragment"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageEnd(Ljava/lang/String;)V

    .line 103
    return-void
.end method

.method public onResume()V
    .registers 2

    .prologue
    .line 76
    invoke-super {p0}, Lcom/brixd/niceapp/activity/fragment/AbsBaseFragment;->onResume()V

    .line 77
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mIsActive:Z

    .line 78
    const-string v0, "CommunityMainFragment"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageStart(Ljava/lang/String;)V

    .line 80
    invoke-direct {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->updateBg()V

    .line 81
    return-void
.end method

.method public onUserSignon(Lcom/brixd/niceapp/bus/event/UserSignonEvent;)V
    .registers 3
    .param p1, "event"    # Lcom/brixd/niceapp/bus/event/UserSignonEvent;
    .annotation runtime Lcom/squareup/otto/Subscribe;
    .end annotation

    .prologue
    .line 296
    iget-boolean v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mIsActive:Z

    if-eqz v0, :cond_22

    iget-boolean v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mIsPublishAction:Z

    if-eqz v0, :cond_22

    .line 297
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v0

    if-eqz v0, :cond_1f

    invoke-virtual {p0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v0

    invoke-virtual {v0}, Landroid/support/v4/app/FragmentActivity;->isFinishing()Z

    move-result v0

    if-nez v0, :cond_1f

    .line 298
    invoke-virtual {p1}, Lcom/brixd/niceapp/bus/event/UserSignonEvent;->getUserModel()Lcom/brixd/niceapp/model/UserModel;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/brixd/niceapp/community/CommunityMainFragment;->handlePublishEvent(Lcom/brixd/niceapp/model/UserModel;)V

    .line 300
    :cond_1f
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mIsPublishAction:Z

    .line 302
    :cond_22
    return-void
.end method

.method public updateBottomNums(Lcom/brixd/niceapp/bus/event/UpdateBottomNumsEvent;)V
    .registers 5
    .param p1, "event"    # Lcom/brixd/niceapp/bus/event/UpdateBottomNumsEvent;
    .annotation runtime Lcom/squareup/otto/Subscribe;
    .end annotation

    .prologue
    .line 318
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mTypes:Ljava/util/ArrayList;

    iget-object v2, p1, Lcom/brixd/niceapp/bus/event/UpdateBottomNumsEvent;->type:Lcom/brixd/niceapp/community/AbsCommunityBaseFragment$AppListType;

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->indexOf(Ljava/lang/Object;)I

    move-result v0

    .line 319
    .local v0, "position":I
    iget-object v1, p0, Lcom/brixd/niceapp/community/CommunityMainFragment;->mAdapter:Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;

    iget-object v2, p1, Lcom/brixd/niceapp/bus/event/UpdateBottomNumsEvent;->appModel:Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v1, v0, v2}, Lcom/brixd/niceapp/community/adapter/CommunityMainAdapter;->updateBottomNums(ILcom/brixd/niceapp/community/model/CommunityAppModel;)V

    .line 320
    return-void
.end method
